package com.xiaoyu.lanling.feature.mission.viewholder

import `in`.srain.cube.views.list.ViewHolderBase
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.xiaoyu.lanling.R
import com.xiaoyu.lanling.feature.mission.model.MissionTitleItem

class MissionTitleViewHolder : ViewHolderBase<MissionTitleItem>() {

    private var mTitle: TextView? = null

    override fun createView(layoutInflater: LayoutInflater, parent: ViewGroup): View? {
        val view = layoutInflater.inflate(R.layout.item_mission_title, parent, false)
        mTitle = view.findViewById(R.id.title)
        return view
    }

    override fun showData(position: Int, itemData: MissionTitleItem) {
        mTitle?.text = itemData.title
    }
}